/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.user.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 用户apiKey ip封禁/解封记录
 *
 * @since 2022-10-28 15:47:43
 */
@Data
@TableName("ripple_user_api_ip_lock_detail")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "用户apiKey ip封禁/解封记录")
public class UserApiIpLockDetail extends Model<UserApiIpLockDetail> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * ip的id
	 */
	@ApiModelProperty(value = "ip的id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long ipId;

	/**
	 * 类型（0封禁记录、1解封记录）
	 */
	@ApiModelProperty(value = "类型（0封禁记录、1解封记录）")
	private String type;

	/**
	 * 操作类型（0系统、1人工）
	 */
	@ApiModelProperty(value = "操作类型（0系统、1人工）")
	private String operationType;

	/**
	 * 当前封禁次数
	 */
	@ApiModelProperty(value = "当前封禁次数")
	private Integer currentLockCount;

	/**
	 * 封禁时长（min）
	 */
	@ApiModelProperty(value = "封禁时长（min）")
	private Integer lockDuration;

	/**
	 * 封禁原因
	 */
	@ApiModelProperty(value = "封禁原因")
	private String lockReason;

	/**
	 * 解封时记录导致封禁的封禁id
	 */
	@ApiModelProperty(value = "解封时记录导致封禁的封禁id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long lockId;

	/**
	 * 解封原因
	 */
	@ApiModelProperty(value = "解封原因")
	private String unlockReason;

	/**
	 * 创建时间（封禁/解封时间）
	 */
	@ApiModelProperty(value = "创建时间（封禁/解封时间）")
	private LocalDateTime createTime;

	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createBy;

	/**
	 * 创建人名称
	 */
	@ApiModelProperty(value = "创建人名称")
	private String createName;

	/**
	 * 修改时间（目前无意义）
	 */
	@ApiModelProperty(value = "修改时间（目前无意义）")
	private LocalDateTime updateTime;

	/**
	 * 修改人（目前无意义）
	 */
	@ApiModelProperty(value = "修改人（目前无意义）")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateBy;

	/**
	 * 状态（无意义）
	 */
	@ApiModelProperty(value = "状态（无意义）")
	private String status;

	/**
	 * 是否删除（0否、null是）
	 */
	@ApiModelProperty(value = "是否删除（0否、null是）")
	private String isDeleted;

}
